<div class="panel panel-default">
    <div class="panel-heading">
        <i class="icon-cloud"></i> <span ng-show="isConsumer">依赖<strong class='text-primary'>{{service}}</strong>服务的</span>应用列表
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12 col-xs-12 col-lg-12 col-sm-12">
        <table class="table-striped table-hover table-condensed table table-condensed table-responsive">
            <thead>
            <tr>
                <th class="text-center"><strong>#</strong></th>
                <th class="text-left" ><strong>应用名</strong>
                    <input type="text" class="inner-form-element" ng-change="filter()" ng-model="query.application" placeholder="输入应用名">
                </th>
                <th class="text-left" ><strong>拥有者</strong>
                    <input type="text" class="inner-form-element" ng-change="filter()" ng-model="query.username" placeholder="输入拥有者">
                </th>
                <th class="text-left"><strong>类型</strong>
                    <select  ng-change="filter()" ng-model="query.type" class="inner-form-element" ng-options="o.val as o.text for o in typeOptions">
                        <option value="">所有</option>
                    </select>
                </th>
                <th class="text-left" ng-show="!isConsumer"><strong>操作</strong></th>
            </tr>
            </thead>
            <tbody>
            <tr ng-show="!applications||applications.length<=0">
                <td class="text-center text-warning" colspan="{{isConsumer?4:5}}">{{(isEmpty||!applications||applications.length<=0)?"未发现任何数据...":"努力加载中...."}}
                </td>
            </tr>
            <tr ng-show="applications&&applications.length>0" ng-repeat="app in applications | orderBy : 'application' | filter:search"
                class="ng-animation">
                <td class="text-center ">{{$index+1}}</td>
                <td class="text-left td-30-width">{{app.application}}</td>
                <td class="text-left td-30-width">{{app.username}}</td>
                <td class="text-left td-15-width"><span class="label {{app.type==1?'label-primary':(app.type==2?'label-warning':'label-success')}}" title="{{app.type==1?'纯提供者':(app.type==2?'纯消费者':'即是提供者也是消费者')}}">{{app.type==1?"P":(app.type==2?"C":"P.AND.C")}}</span></td>
                <td class="text-left" ng-show="!isConsumer">
                    <a href="#/admin/{{app.application}}/nodes" class="link" style="text-underline: none;"
                       title="部署节点列表">
                        <i class="icon-desktop"></i>
                    </a>
                    &nbsp;| &nbsp;
                    <a href="#/admin/{{app.application}}/provides" class="link" title="该应用的发布服务列表">
                        <i class="glyphicon glyphicon-share"></i>
                    </a>
                    &nbsp;| &nbsp;
                    <a href="#/admin/{{app.application}}/consumes" class="link" title="该应用的订阅服务列表">
                        <i class="glyphicon glyphicon-pushpin"></i>
                    </a> &nbsp;| &nbsp;
                    <a href="#/admin/{{app.application}}/consumers" class="link" title="该应用的上层应用（依赖该应用的上层应用）">
                        <i class=" icon-sitemap"></i>
                    </a>
                </td>
            </tr>
            </tbody>
        </table>
                </div>
            </div>
    </div>
</div>